﻿import request from '/@/utils/request';
enum Api {
  AddBoardDevice = '/api/boardDevice/add',
  DeleteBoardDevice = '/api/boardDevice/delete',
  UpdateBoardDevice = '/api/boardDevice/update',
  PageBoardDevice = '/api/boardDevice/page',
  DetailBoardDevice = '/api/boardDevice/detail',
  GetBoardPlaceDevicePlaceDropdown = '/api/boardDevice/BoardPlaceDevicePlaceDropdown',
}

// 增加设备清单
export const addBoardDevice = (params?: any) =>
	request({
		url: Api.AddBoardDevice,
		method: 'post',
		data: params,
	});

// 删除设备清单
export const deleteBoardDevice = (params?: any) => 
	request({
			url: Api.DeleteBoardDevice,
			method: 'post',
			data: params,
		});

// 编辑设备清单
export const updateBoardDevice = (params?: any) => 
	request({
			url: Api.UpdateBoardDevice,
			method: 'post',
			data: params,
		});

// 分页查询设备清单
export const pageBoardDevice = (params?: any) => 
	request({
			url: Api.PageBoardDevice,
			method: 'post',
			data: params,
		});

// 详情设备清单
export const detailBoardDevice = (id: any) => 
	request({
			url: Api.DetailBoardDevice,
			method: 'get',
			data: { id },
		});

export const getBoardPlaceDevicePlaceDropdown = () =>
		request({
		url: Api.GetBoardPlaceDevicePlaceDropdown,
		method: 'get'
		});

